﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    Tools > NuGet Package Manager > Package Manager Console

    Run Install-Package Microsoft.EntityFrameworkCore.SqlServer

    We will be using some Entity Framework Core Tools to create a database from your EF Core model. So we will install the tools package as well:

    Run Install-Package Microsoft.EntityFrameworkCore.Tools
    We will be using some ASP.NET Core Scaffolding tools to create controllers and views later on. So we will install this design package as well:

    Run Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design


    Once you have a model, you can use migrations to create a database.

    Open the PMC:

    Tools –> NuGet Package Manager –> Package Manager Console

    Run Add-Migration InitialCreate to scaffold a migration to create the initial set of tables for your model. If you receive an error stating The term 'add-migration' is not recognized as the name of a cmdlet, close and reopen Visual Studio.
    Run Update-Database to apply the new migration to the database. This command creates the database before applying migrations
</body>
</html>